home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 1996 September & October
/
Amiga-CD 1996 #9-10.iso
/
ausgabe_9_96
/
kommunikation
/
inetutils-1.4-amitcp
/
contrib
/
stuff.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-10-04
|
4KB
|
121 lines
Path: hearst.acc.Virginia.EDU!concert!inxs.ncren.net!taco.cc.ncsu.edu!lll-winken.llnl.gov!decwrl!hookup!yeshua.marcam.com!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!news.sprintlink.net!nwnexus!calvino.alaska.net!alaska.net!mitcht
From: mitcht@alaska.net (Mitch Thompson)
Newsgroups: comp.sys.amiga.networking
Subject: Re: NNTP Posting utility
Date: Mon, 03 Oct 1994 18:18:11 AST
Organization: ""
Lines: 107
Message-ID: <zL0xv*310@alaska.net>
References: <Cwyp91.5G8@news.ci.ua.pt>
Reply-To: mitcht@alaska.net
NNTP-Posting-Host: mitcht.alaska.net
X-Newsreader: Arn V1.03a
In article <Cwyp91.5G8@news.ci.ua.pt>, Celso Martinho writes:
> I would like to know if anyone has wrote a NNTPPost-like program
> that supports batch files and not only one article at a time.
>
> It would really make life easier for me. :)
>
> Thanks in advance,
> --
This works for me. Run this script whenever you call for news:
getnews
-----------------cut here----------------------------
;First, trim old news posts out before calling for new mail.
Hard:Nettools/PurgeNews ACTIVEFILE=UULIB:Active NP DATAFILE=UUNEWS:Purge.dat
; Next, set up connection.
execute Amitcp:startppp
wait 5 sec
;send news, if any.
list uunews:NNTPSpoolDir lformat="nntppost %p%n*ndelete %p%n" TO T:Post
execute t:Post
delete >NIL: T:Post
;<The above three lines are the ones you want.>
;now, receive news.
uucp:c/nntpxfer news.alaska.net uulib:active PARANOID
;Log off...
amitcp:bin/stopnet
wait 10
;Next, redo ARn's DataBase
UUCP:c/arnmaster
;Finished!
---------------------------cut here------------------------------
Also, in your newsreaders config file, use the following or equivalent to
post mail to the UUNews:NNTPSPoolDir directory:
SENDNEWS rx rexx:nntpcopy.rexx %s
In Rexx:, have the following file:NNTPCopy.rexx
----------------------------cut here------------------------------
/*
* nntpcopy version 1.0
*
* ARexx script to copy a news article into uunews:NNTPSpoolDir
* A unique filename is created before copying the article
* Usage: nntpcopy <article>
*
* Written by David Jameson, 1994.
*/
arg args
/* Open RexxSupport library */
if ~show('L', 'rexxsupport.library') then do
if addlib('rexxsupport.library', 0, -30, 0) then
say 'added rexxsupport.library'
else do
say 'failed to open rexxsupport.library'
exit 10
end
end
date = date()
parse var date day month year
/* Remove leading spaces from year */
year = right(year,4)
time = time()
parse var time hour ':' min ':' sec
filename = 'article.'||hour||'.'||min||'.'||sec||'.'||day||month||year
if exists('uunews:NNTPSpoolDir/'||filename) then do
say 'Error: temporary file already exists'
exit 20
end
/* Copy file into NNTPSpoolDir */
address command
'copy' args 'uunews:NNTPSpoolDir/'||filename||' >t:'||filename
ret_val = statef('t:'||filename) /* major kludge... */
parse var ret_val type size ignore
if size ~= 0 then exit 10 /* copy failed */
exit 0
---------------------------------cut here---------------------------
Please note!!!! The above scripts (both DOS and REXX) are not mine! I
got them from AmiNET. They are part of an archive what I no longer have,
so I cannot remember who wrote them. I am in no way taking credit for
their creation, nor responsibility for any damage they may cause. They
work here. The only problem I have with them is when I am posting mail to
my news server, if it gets refused for any reason, it also gets deleted.
A minor annoyance.
Mitch Thompson